package com.example.erorr;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by Administrator on 2017/4/25.
 */
@ControllerAdvice
public class TestEorr {
    @ExceptionHandler(value = Exception.class)
    public void defaultError(HttpServletRequest httpServletRequest,Exception e){
        e.printStackTrace();
        System.out.println("TestEorr.defaultError()");
    }
}
